const { exec } = require("../db/mysql")
const { SuccessModel, ErrorModel } = require("../model/resModel")

const login = (username, password) => {
  const sql = `select * from user where username="${username}" and password="${password}";`
  return exec(sql).then(rows => {
    if(rows[0]){
      return rows[0]
    }
  })
}
module.exports = {
  login
}